package slap.mvc.result;

import slap.exception.FastRuntimeException;
import slap.http.Request;
import slap.http.Response;

/**
 * Result support
 */
public abstract class Result extends FastRuntimeException {

    public Result() {
        super();
    }

    public Result(String description) {
        super(description);
    }

    public abstract void apply(Request request, Response response);

    protected void setContentTypeIfNotSet(Response response, String contentType) {
        response.setContentTypeIfNotSet(contentType);
    }

	public static void popup(Result result) {
		throw result;
	}

}
